package Cars.Models;

public class Bus extends BaseModel{
    private static final String ChangeFirst = "金杯";
    private static final String ChangeSecond = "金龙";

    @Override
    public void setType(int type) throws Exception {
        switch (type){
            case 1:{
                this.type = ChangeFirst;
                break;
            }
            case 2:{
                this.type=ChangeSecond;
                break;
            }
            default:{
                throw new Exception("");
            }
        }

    }

    @Override
    public void setPrice(Float price) {
        if (price<=16F) {
            this.Price=800.00F;
        }else{
            this.Price=1500.00F;
        }
    }

}
